package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserSubscribeLogDTO;
import com.financing.wap.dao.IDstUserSubscribeLogDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_subscribe_log  
 * 用户订阅记录表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserSubscribeLogDao")
public class DstUserSubscribeLogDaoImpl extends BaseDaoImpl<DstUserSubscribeLogDTO, java.lang.Integer> implements IDstUserSubscribeLogDao {


	@Override
	public int insert(DstUserSubscribeLogDTO dstUserSubscribeLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserSubscribeLogSql.insert, dstUserSubscribeLog);
	}

	@Override
	public void update(DstUserSubscribeLogDTO dstUserSubscribeLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserSubscribeLogSql.update, dstUserSubscribeLog);
	}

	@Override
	public void updateForce(DstUserSubscribeLogDTO dstUserSubscribeLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserSubscribeLogSql.updateForce, dstUserSubscribeLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserSubscribeLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserSubscribeLogDTO> queryList(DstUserSubscribeLogDTO dstUserSubscribeLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserSubscribeLogSql.queryList, dstUserSubscribeLog);
	}

	@Override
	public int queryListCount(DstUserSubscribeLogDTO dstUserSubscribeLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserSubscribeLogSql.queryListCount, dstUserSubscribeLog);
	}

	@Override
	public DstUserSubscribeLogDTO loadById(Integer id) throws SQLException {
		return  (DstUserSubscribeLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserSubscribeLogSql.loadById,id);
	}

	@Override
	public Class<DstUserSubscribeLogDTO> getEntityClass() {
		return DstUserSubscribeLogDTO.class;
	}
 	
}
